<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML>
<html>
<head>
<title>'addnewnovel.jsp'</title>

<style>
table {
	border: 1px solid red;
	width: 300px;
}

td {
	border: 1px solid #99ffcc;
	text-align: center;
}

.td1 {
	width: 90px;
}

input {
	width: 100%;
}

textarea {
	width: 100%;
	height: 100px;
	resize: none
}
</style>
<script type="text/javascript" src="${pageContext.request.contextPath }/JS/toDoXHR.js"></script></head>
<script type="text/javascript">
function newNovel(){
//参数 要处理的数据
var new_nlname = document.getElementById("new_nlname").value;
var sort = document.getElementById("sort").value;
var summary = document.getElementById("summary").value;


var url="${pageContext.request.contextPath }/author/AddNewNovel";
var method="POST";
var params = "new_nlname="+new_nlname+"&sort="+sort+"&summary="+summary;
var tagid="tips";
toDoXHR(url,method,params,tagid);

}

</script>
<body>

	<div align="center">
		<h2>新书信息</h2>
	</div>
	<div align="center">
		<form action="" method="post">
			<table>
				<tr>
					<td class="td1">小说名：</td>
					<td><input type="text" id="new_nlname"></td>
				</tr>
				<tr>
					<td class="td1">类型:</td>
					<td><select id="sort">
							<option value="wuxia">武 侠</option>
							<option value="xuanhuan">玄 幻</option>
							<option value="kehuan">科 幻</option>
							<option value="dushi">都 市</option>
							<option value="yanqing">言 情</option>
							<option value="xuanyi">悬 疑</option>
							<option value="junshi">军 事</option>
							<option value="others">其 他</option>
					</select></td>
				</tr>
				<tr>
					<td colspan="2">简介</td>
				</tr>
				<tr>
					<td colspan="2"><textarea id="summary"  wrap="physical"></textarea>
					</td>
				</tr>
				<tr>
					<td colspan="2">
					<input type="button" value="确认"style="width:60px;" onclick="newNovel()"/>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div id="tips" align="center"></div>
</body>
</html>
